/*
 * Book.java
 *
 * Created on 2006��10��30��, ����6:14
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.fengniu.ejb.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
// @Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(name = "UserTable", schema = "FENGNIU", uniqueConstraints = {})
@NamedQueries( {
		@NamedQuery(name = "User.findByUserId", query = "SELECT u FROM User u WHERE u.userId=:userId"),
		@NamedQuery(name = "User.findUserByArbitraryId", query = "SELECT u FROM User u WHERE u.userId=:userId OR u.tel=:tel OR u.mobile=:mobile OR qqId=:qqId") })
public class User extends GeneEntity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -1733389027508297210L;

	@Column(nullable = false, unique = true, updatable = false)
	private String userId;

	private String firstName;

	private String lastName;

	private String nickName;

	private String password;

	private String tel;

	private String mobile;

	private String qqId;

	private String detailAddress1;

	private String detailAddress2;

	private String city;

	private String state;

	private String zip;

	private String smallImageUrl;

	private String largeImageUrl;

	private String blogUrl;

	@Temporal(value = TemporalType.TIMESTAMP)
	private Date birthDate;

	private Integer integral = new Integer(0); // 积分

	// You can also cache relationship collections. Any attempt to access the
	// contacts collection of Customer will attempt to load the data from the
	// cache before hitting the database:
	// @Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)
	// @OneToMany
	// List<Contact> contacts;

	private String apiKey;

	private String userType;

	/** Creates a new instance of Book */
	public User() {
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public Date getBirthDate() {
		return birthDate;
	}

	public void setBirthDate(Date birthDate) {
		this.birthDate = birthDate;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getDetailAddress1() {
		return detailAddress1;
	}

	public void setDetailAddress1(String detailAddress1) {
		this.detailAddress1 = detailAddress1;
	}

	public String getDetailAddress2() {
		return detailAddress2;
	}

	public void setDetailAddress2(String detailAddress2) {
		this.detailAddress2 = detailAddress2;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String emailAddr) {
		this.userId = emailAddr;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getZip() {
		return zip;
	}

	public void setZip(String zip) {
		this.zip = zip;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getLargeImageUrl() {
		return largeImageUrl;
	}

	public void setLargeImageUrl(String largeImageUrl) {
		this.largeImageUrl = largeImageUrl;
	}

	public String getSmallImageUrl() {
		return smallImageUrl;
	}

	public void setSmallImageUrl(String smallImageUrl) {
		this.smallImageUrl = smallImageUrl;
	}

	public String getBlogUrl() {
		return blogUrl;
	}

	public void setBlogUrl(String blogUrl) {
		this.blogUrl = blogUrl;
	}

	public String getApiKey() {
		return apiKey;
	}

	public void setApiKey(String apiKey) {
		this.apiKey = apiKey;
	}

	public String getUserType() {
		return userType;
	}

	public void setUserType(String type) {
		this.userType = type;
	}

	public Integer getIntegral() {
		return integral;
	}

	public void setIntegral(Integer integral) {
		this.integral = integral;
	}

	public String getQqId() {
		return qqId;
	}

	public void setQqId(String qqId) {
		this.qqId = qqId;
	}
}
